/*jslint maxerr: 50, indent: 4, browser: true */
/*global define */

(function () {
    "use strict";

    define("object.getPrototypeOf", ["mergeModules", "init"], function (make) {
        var buri = make.mergeModules(arguments),
            config = {
                "compatability": {}
            },
            func = {}.constructor.getPrototypeOf,
            proto = "__proto__",
            getPrototypeOf;

        if (!config.compatability.all && !config.compatability["object.hasOwnProperty"] && typeof func === "function") {
            getPrototypeOf = func;
        } else if (typeof "test"[proto] === "object") {
            getPrototypeOf = function (obj) {
                return obj[proto];
            };
        } else {
            getPrototypeOf = function (obj) {
                return obj.constructor.prototype;
            };
        }

        getPrototypeOf.init = function (options) {
            buri.init(config, options);
        };

        return {
            "object": {
                "getPrototypeOf": getPrototypeOf
            }
        };
    });
}());
